<?php
include_once "../libraries/xl_bo_dem.php";
$dt_xl_bo_dem = new xl_bo_dem;
?>
<div class="art-block">
  <div class="art-block-body">
    <div class="art-blockheader">
      <div class="l"></div>
      <div class="r"></div>
      <h3 class="t">Số người truy cập</h3>
    </div>
    <div class="art-blockcontent">
      <div class="art-blockcontent-tl"></div>
      <div class="art-blockcontent-tr"></div>
      <div class="art-blockcontent-bl"></div>
      <div class="art-blockcontent-br"></div>
      <div class="art-blockcontent-tc"></div>
      <div class="art-blockcontent-bc"></div>
      <div class="art-blockcontent-cl"></div>
      <div class="art-blockcontent-cr"></div>
      <div class="art-blockcontent-cc"></div>
      <div class="art-blockcontent-body">
        <div style="text-align: center; padding-top: 5px;"><?php
        	$soluong = $dt_xl_bo_dem->so_luong();
			
			$str_soluong = strval($soluong);
			
			$n_soluong = strlen($str_soluong);						
			
			$temp = '000000';
			
			$str_cut = substr($temp, 0, 7-$n_soluong);
			
			$str_soluong = $str_cut.$str_soluong;
			
			for($i=0 ; $i<7 ; $i++) {
				echo '<img src="../images/'.$str_soluong[$i].'.gif" />';
			}
		
		?>  </div>
        <div style="padding-left: 28px; padding-bottom: 5px;">
          <table class="songuoitruycap">
            <tbody>
              <tr height="30px">
                <td><img alt="" src="../images/homqua.gif"></td>
                <td width="70px">Hôm nay</td>
                <td><?php echo $dt_xl_bo_dem->so_luong_hom_nay()?></td>
              </tr>
              <tr>
                <td><img alt="" src="../images/homnay.gif"></td>
                <td>Hôm qua</td>
                <td><?php echo $dt_xl_bo_dem->so_luong_hom_qua()?></td>
              </tr>
              <tr>
                <td><img alt="" src="../images/tuan.gif"></td>
                <td>Tuần này</td>
                <td><?php echo $dt_xl_bo_dem->so_luong_tuan_nay()?></td>
              </tr>
              <tr>
                <td><img alt="" src="../images/thang.gif"></td>
                <td>Tháng này</td>
                <td><?php echo $dt_xl_bo_dem->so_luong_thang_nay()?></td>
              </tr>
              <tr>
                <td><img alt="" src="../images/tatca.gif"></td>
                <td>Tất cả</td>
                <td><?php echo $soluong;?></td>
              </tr>
            </tbody>
          </table>
        </div>
        <div class="cleared"></div>
      </div>
    </div>
    <div class="cleared"></div>
  </div>
</div>
